<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="alert alert-warning-light">
        文件上传请注意大小，小程序端需要解析文件，如果文件过大，可能会出现解析时间过长的情况
    </div>


    <div class="form-group">
        <label  class="control-label col-xs-12 col-sm-2">分类名称:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[cate_id]">
                {foreach name="parentList" item="vo"}
                <option data-type="{$vo.type}" value="{$key}" {in name="key" value="$row.cate_id"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

         <!--   <div class="radio">
                <label for="row[catename]-normal">
                    <input id="row[catename]-normal" {if $row.catename == '维修教程'} checked="checked" {/if}  name="row[catename]" type="radio" value="维修教程"> 维修教程
                </label>
                <label for="row[catename]-hidden">
                    <input id="row[catename]-hidden" {if $row.catename == '故障案例'} checked="checked" {/if} name="row[catename]" type="radio" value="故障案例"> 故障案例</label>
            </div>-->
        </div>
    </div>
    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="row[title]" value="{$row.title|htmlentities}"  id="title" class="form-control" required />
        </div>
    </div>

    <div class="form-group">
        <label for="c-local" class="control-label col-xs-12 col-sm-2">上传文件:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="row[url]" id="c-local" class="form-control" data-rule="" value="{$row.url|htmlentities}"/>
        </div>
        <div class="col-xs-12 col-sm-3" style="margin-left: 16.6%; margin-top: 15px;">
            <button id="plupload-local" class="btn btn-primary plupload" data-input-id="c-local"  data-url="{:url('ajax/upload')}"><i class="fa fa-upload"></i> 选择文件</button>
        </div>
    </div>

    <div class="form-group">
        <label for="c-editor" class="control-label col-xs-12 col-sm-2">详情:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea name="row[content]" id="c-editor" cols="60" rows="5" class="form-control editor">{$row.content}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>


    <div class="form-group hide layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
